********************************************************
*** Creation of social norms under weak institutions ***
*** Code that produces all tables and statistical    ***
*** tests in the paper. Anything not included in     ***
*** this script, is created by the R script		 	 ***
********************************************************


***********************************************
**** setup and load data
set more off
clear all
import delimited creation_norms_data.csv // import .csv file

* label variables and values from csv file for better data handling
label variable individual "Individual individual"
label variable period "Round of the game"
label variable session_id "ID of session"
label variable treatment "Treatment"
label define treatl 1 "low-noS" 2 "low-S" 3 "hi-noS" 4 "hi-S"
label values treatment treatl
label variable sanc_treat "Sanctioning treatment"
label define sancl 0 "No sanctioning" 1 "Sanctioning"
label values sanc_treat sancl
label variable manip_treat "Social Information"
label define manipl 0 "Low" 1 "High"
label values manip_treat manipl
label variable pb "Personal normative belief"
label define pbl 1 "Private account" 2 "do what others do" 3 "Group account"
label variable ne "Normative expectation"
label values pb ne pbl
label variable ee "Empirical expectation"
label define eel 0 "Private account" 1 "Group account"
label values ee eel
label variable coop "Cooepration decision"
label define coopl 0 "No cooperation" 1 "Cooperation"
label values coop coopl
label variable age "Age"
label variable region_origin "Region of origin"
label variable v_region "Modal response to region_origin question within session"
label variable crewsize "Crew size"
label variable gender "Gender"
label variable risk_measure "Gneezy Potters risk investment (out of 6 points)"
label define genderl 0 "Male" 1 "Female"
label values gender genderl
label variable movefreq "Frequency of moving"
label define movel 1 "Never moved" 2 "A few times" 3 "Once a year" 4 "Several times a year"
label values movefreq movel
label variable earndaily "Earnings on a normal day"
label define earnl 1 "0-5k TZS" 2 "5k-10k TZS" 3 "10k-20k TZS" 4 "20k-50k TZS" 5 "50k TZS+"
label values earndaily earnl
label variable natcoop_before "Prior participation in experiment"
label define yesno 0 "No" 1 "Yes"
label values natcoop_before yesno
label variable maingear "Main choice of gear"
label variable v_gear "Modal response to maingear question within session"
label define gearl 1 "Gillnet" 2 "Hook" 3 "Dagaa net" 4 "Other gear"
label values maingear gearl
label values v_gear gearl
label variable understand "Rule comprehension"
label values understand yesno
label variable age2 "Age squared"
label variable excluded_def "Excluded after defection"
label variable vote "Voting decision"
label define votel 0 "Vote to exclude defectors" 1 "Vote to exclude cooperators" 3 "Vote to exclude no one"
label values vote votel
label variable vote_defect "Voted to exclude defectors"
label variable excluded_coop "Excluded after cooperation"
label values excluded_def excluded_coop vote_defect yesno
label variable affil_0gear_100orig "Alternative specification of proximity measure"
label variable affil_100gear_0orig "Alternative specification of proximity measure"
label variable affil_25gear_75orig "Alternative specification of proximity measure"
label variable affil_75gear_25orig "Alternative specification of proximity measure"
label variable affil "Social proximity measure"
label variable dagaa_gear "Main gear is dagaa net"
label values dagaa_gear yesno
label variable hhfracfish "Fishing as fraction of household income"
label define hhfracl 1 "0%-25%" 2 "26%-50%" 3 "51%-75%" 4 "76%-100%"
label values hhfracfish hhfracl

save "creation_norms_data.dta", replace // save as .dta file in current directory

codebookout codebook_creation, replace // creation of codebook in current directory

*** Necessary adjustments for regression analyses:
su crewsize
replace crewsize=r(mean) if crewsize==. // assign mean to crewsize value if missing
egen session_period = group(session_id period) // unique period*session identifier

save "creation_norms_data.dta", replace // save as .dta file in current directory

*****************
*** Section 3 ***
*****************

***
* re-sampling rate reported in footnote 12

use "creation_norms_data.dta", clear

duplicates drop individual, force // retain on observation per participant
tab natcoop_before // 45.31%

***
* Footnote 13: ttest of risk aversion by social info treatment
use "creation_norms_data.dta", clear

ttest risk_measure, by(manip_treat)


***
* Table 3 is created in R using the csv file that is exported below
use "creation_norms_data.dta", clear
keep if period==1

export delimited using "all_data_R.csv", nolabel replace

*****************
*** Section 5 ***
*****************
use "creation_norms_data.dta", clear

***
* Figure 2 is created in R using an Excel file that is created with the following code

putexcel set ValuesFigure_2, replace
putexcel A1="Round"
putexcel A2="1"
putexcel A3="2"
putexcel A4="3"
putexcel A5="4"
putexcel A6="5"
putexcel A7="6"
putexcel A8="7"
putexcel B1="T1m"
putexcel C1="T1se"
putexcel D1="T2m"
putexcel E1="T2se"
putexcel F1="T3m"
putexcel G1="T3se"
putexcel H1="T4m"
putexcel I1="T4se"

* mean values and standard errors for low-noS treatment
forval i = 1/7 {
local j = `i'+1
sum coop if treatment==1 & period==`i'
putexcel B`j'=`r(mean)', nformat(number_d2)
tabstat coop if treatment==1 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel C`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for low-S treatment
forval i = 1/7 {
local j = `i'+1
sum coop if treatment==2 & period==`i'
putexcel D`j'=`r(mean)', nformat(number_d2)
tabstat coop if treatment==2 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel E`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for hi-noS treatment
forval i = 1/7 {
local j = `i'+1
sum coop if treatment==3 & period==`i'
putexcel F`j'=`r(mean)', nformat(number_d2)
tabstat coop if treatment==3 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel G`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for hi-S treatment
forval i = 1/7 {
local j = `i'+1
sum coop if treatment==4 & period==`i'
putexcel H`j'=`r(mean)', nformat(number_d2)
tabstat coop if treatment==4 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel I`j'=s[1,1], nformat(#.###)
}

***
* Table 4:
use "creation_norms_data.dta", clear

* column (1): cooperation - no covariates
reghdfe coop c.period##ib4.treatment i.session_id, vce(cluster period#session_id individual) noabsorb

* column (2): cooperation - adjusted covariates
reghdfe coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, vce(cluster period#session_id individual) noabsorb

* column (3): emp exp - no covariates
reghdfe ee c.period##ib4.treatment i.session_id, vce(cluster period#session_id individual) noabsorb

* column (4): emp exp - adjusted covariates
reghdfe ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, vce(cluster period#session_id individual) noabsorb

***
* Figures 3 and 4 are created in R

***
* Figure 4 uses an Excel file that is created with the following code

putexcel set ValuesFigure_4, replace
putexcel A1="Round"
putexcel A2="1"
putexcel A3="2"
putexcel A4="3"
putexcel A5="4"
putexcel A6="5"
putexcel A7="6"
putexcel A8="7"
putexcel B1="T1m"
putexcel C1="T1se"
putexcel D1="T2m"
putexcel E1="T2se"
putexcel F1="T3m"
putexcel G1="T3se"
putexcel H1="T4m"
putexcel I1="T4se"

* mean values and standard errors for low-noS treatment
forval i = 1/7 {
local j = `i'+1
sum ee if treatment==1 & period==`i'
putexcel B`j'=`r(mean)', nformat(number_d2)
tabstat ee if treatment==1 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel C`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for low-S treatment
forval i = 1/7 {
local j = `i'+1
sum ee if treatment==2 & period==`i'
putexcel D`j'=`r(mean)', nformat(number_d2)
tabstat ee if treatment==2 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel E`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for hi-noS treatment
forval i = 1/7 {
local j = `i'+1
sum ee if treatment==3 & period==`i'
putexcel F`j'=`r(mean)', nformat(number_d2)
tabstat ee if treatment==3 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel G`j'=s[1,1], nformat(#.###)
}

* mean values and standard errors for hi-S treatment
forval i = 1/7 {
local j = `i'+1
sum ee if treatment==4 & period==`i'
putexcel H`j'=`r(mean)', nformat(number_d2)
tabstat ee if treatment==4 & period==`i', s(semean) save
matrix s = r(StatTotal)
putexcel I`j'=s[1,1], nformat(#.###)
}



***
* Table 5:
use "creation_norms_data.dta", clear

xtset individual period

* column (1): vote to exclude defectors
reghdfe vote_defect coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, vce(cluster period#session_id individual) noabsorb
estimates store col1

* column (2): cooperation 
reghdfe coop l.coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, vce(cluster period#session_id individual) noabsorb


* column (3): empirical expectations
reghdfe ee l.coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, vce(cluster period#session_id individual) noabsorb

***
* Text on voting behavior

drop if sanc_treat==0

bys treatment: tab vote

***
* Exclusion likelihood (footnote 22)

bys treatment period: tab excluded_def if coop==0
bys treatment period: tab excluded_coop if coop==1

***
* Figure 5 is created in R using an Excel file that is created with the following code
use "creation_norms_data.dta", clear

putexcel set ValuesFigure_5, replace
putexcel A1="Proximity"
putexcel A2="Proximity = 0"
putexcel A6="Proximity = 0.5"
putexcel A10="Proximity = 1"
putexcel B1="treatment"
putexcel B2="hi-S"
putexcel B3="hi-noS"
putexcel B4="low-noS"
putexcel B5="low-S"
putexcel B6="hi-S"
putexcel B7="hi-noS"
putexcel B8="low-noS"
putexcel B9="low-S"
putexcel B10="hi-S"
putexcel B11="hi-noS"
putexcel B12="low-noS"
putexcel B13="low-S"
putexcel C1="coef.coop"
putexcel D1="SE.coop"
putexcel E1="coef.ee"
putexcel F1="SE.ee"


* The necessary regression models and margin calculations are as follows:

*prepare proximity groups
egen affil2=group(affil)
xtset individual period


* regression on cooperation (column (1) of Table A-6 in the Web Appendix)
reghdfe coop ib2.affil2##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, vce(cluster period#session_id individual) noabsorb

* margin calculation for cooperation
margins, at(affil2=(1 2 3)) over(i.treatment)
matrix r = r(table)

* marginal effects and standard errors for proximity = 0
putexcel C2=r[1,4]
putexcel D2=r[2,4]
putexcel C3=r[1,3]
putexcel D3=r[2,3]
putexcel C4=r[1,1]
putexcel D4=r[2,1]
putexcel C5=r[1,2]
putexcel D5=r[2,2]

* marginal effects and standard errors for proximity = 0.5
putexcel C6=r[1,8]
putexcel D6=r[2,8]
putexcel C7=r[1,7]
putexcel D7=r[2,7]
putexcel C8=r[1,5]
putexcel D8=r[2,5]
putexcel C9=r[1,6]
putexcel D9=r[2,6]

* marginal effects and standard errors for proximity = 1
putexcel C10=r[1,12]
putexcel D10=r[2,12]
putexcel C11=r[1,11]
putexcel D11=r[2,11]
putexcel C12=r[1,9]
putexcel D12=r[2,9]
putexcel C13=r[1,10]
putexcel D13=r[2,10]


***
* regression on expectations (column (2) of Table A-6 in the Web Appendix)
reghdfe ee ib2.affil2##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, vce(cluster period#session_id individual) noabsorb

* margin calculation for empirical expectations
margins, at(affil2=(1 2 3)) over(i.treatment)
matrix r = r(table)

* marginal effects and standard errors for proximity = 0
putexcel E2=r[1,4]
putexcel F2=r[2,4]
putexcel E3=r[1,3]
putexcel F3=r[2,3]
putexcel E4=r[1,1]
putexcel F4=r[2,1]
putexcel E5=r[1,2]
putexcel F5=r[2,2]

* marginal effects and standard errors for proximity = 0.5
putexcel E6=r[1,8]
putexcel F6=r[2,8]
putexcel E7=r[1,7]
putexcel F7=r[2,7]
putexcel E8=r[1,5]
putexcel F8=r[2,5]
putexcel E9=r[1,6]
putexcel F9=r[2,6]

* marginal effects and standard errors for proximity = 1
putexcel E10=r[1,12]
putexcel F10=r[2,12]
putexcel E11=r[1,11]
putexcel F11=r[2,11]
putexcel E12=r[1,9]
putexcel F12=r[2,9]
putexcel E13=r[1,10]
putexcel F13=r[2,10]


***********************************
*** Replication of Web Appendix ***
***********************************

use "creation_norms_data.dta", clear

* Table A-1 is created in R

* Table A-2 (necessary pairwise tests)
* OS
  ranksum coop if (treatment==1 |  treatment==2) & period==1, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==1, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==1, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==1, by(treatment)
* Round 1
  ranksum coop if (treatment==1 |  treatment==2) & period==2, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==2, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==2, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==2, by(treatment)
* Round 2
  ranksum coop if (treatment==1 |  treatment==2) & period==3, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==3, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==3, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==3, by(treatment)
* Round 3
  ranksum coop if (treatment==1 |  treatment==2) & period==4, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==4, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==4, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==4, by(treatment)
* Round 4
  ranksum coop if (treatment==1 |  treatment==2) & period==5, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==5, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==5, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==5, by(treatment)
* Round 5
  ranksum coop if (treatment==1 |  treatment==2) & period==6, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==6, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==6, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==6, by(treatment)
* Round 6
  ranksum coop if (treatment==1 |  treatment==2) & period==7, by(treatment)
  ranksum coop if (treatment==3 |  treatment==4) & period==7, by(treatment)
  ranksum coop if (treatment==1 |  treatment==3) & period==7, by(treatment)
  ranksum coop if (treatment==2 |  treatment==4) & period==7, by(treatment)


* Pairwise test on session level 
collapse (mean) coop, by(session_id treatment)
by treatment, sort: summarize coop

ranksum  coop if (treatment==1 |  treatment==2) , by(treatment)
ranksum  coop if (treatment==3 |  treatment==4) , by(treatment)
ranksum  coop if (treatment==1 |  treatment==3) , by(treatment)
ranksum  coop if (treatment==2 |  treatment==4) , by(treatment)


***
* Table A-3
use "creation_norms_data.dta", clear

*column (1): cooperation - full sample
reghdfe coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, vce(cluster period#session_id individual) noabsorb


*column (2): ee - full sample
reghdfe ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, vce(cluster period#session_id individual) noabsorb


*column (3): cooperation - without period 1
reghdfe coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period>1, vce(cluster period#session_id individual) noabsorb


*column (4): ee - without period 1
reghdfe ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period>1, vce(cluster period#session_id individual) noabsorb


*column (5): cooperation - without period 7
reghdfe coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period<7, vce(cluster period#session_id individual) noabsorb


*column (6): ee - without period 7
reghdfe ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period<7, vce(cluster period#session_id individual) noabsorb


*column (7): cooperation - without test Q
reghdfe coop c.period##ib4.treatment age age2 dagaa_gear crewsize i.session_id if understand==1, vce(cluster period#session_id individual) noabsorb


*column (8): ee - without test Q
reghdfe ee c.period##ib4.treatment age age2 dagaa_gear crewsize i.session_id if understand==1, vce(cluster period#session_id individual) noabsorb

***
* Table A-4:
use "creation_norms_data.dta", clear

*new column (1): cooperation - full sample
vcemway probit coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, cluster(session_period individual)


*new column (2): ee - full sample
vcemway probit ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id, cluster(session_period individual)


*new column (3): cooperation - without period 1
vcemway probit coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period>1, cluster(session_period individual)


*new column (4): ee - without period 1
vcemway probit ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period>1, cluster(session_period individual)


*new column (5): cooperation - without period 7
vcemway probit coop c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period<7, cluster(session_period individual)


*new column (6): ee - without period 7
vcemway probit ee c.period##ib4.treatment age age2 understand dagaa_gear crewsize i.session_id if period<7, cluster(session_period individual)


*new column (7): cooperation - without test Q
vcemway probit coop c.period##ib4.treatment age age2 dagaa_gear crewsize i.session_id if understand==1, cluster(session_period individual)


*new column (8): ee - without test Q
vcemway probit ee c.period##ib4.treatment age age2 dagaa_gear crewsize i.session_id if understand==1, cluster(session_period individual)

***
* Table A-5
use "creation_norms_data.dta", clear
xtset individual period

* column (1): vote to exclude defectors
vcemway probit vote_defect coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand  dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, cluster(session_period individual)  

* column (2): cooperation 
vcemway probit coop l.coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand  dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, cluster(session_period individual) 

* column (3): empirical expectations
vcemway probit ee l.coop l.excluded_def##ib4.treatment l.excluded_coop##ib4.treatment c.period##ib4.treatment understand  dagaa_gear crewsize age age2 i.session_id if sanc_treat==1, cluster(session_period individual) 


***
* Figure A-1:
use "creation_norms_data.dta", clear
* prepare the indicator variables for gear
gen h_gear=.
replace h_gear=1 if maingear==v_gear
replace h_gear=0 if maingear!=v_gear
bys session_id: egen distr_gear=mean(h_gear)
replace distr_gear=distr_gear*21

*and region of origin
gen h_region=.
replace h_region=1 if region_origin==v_region
replace h_region=0 if region_origin!=v_region
bys session_id: egen distr_region=mean(h_region)
replace distr_region=distr_region*21

*build histograms for the figure
duplicates drop session_id, force
set scheme lean1, perm

histogram distr_gear, bin(21) ylab(0(1)5, labsize(large)) xlab(0(5)20, labsize(large)) lw(medthick) barw(0.9) fcolor(gs8) lcolor(gs2) start(0) freq xti(No. of participants with proximity = 1 (gear), size(vlarge)) yti(No. of sessions, size(vlarge))

sum distr_gear, d
tab distr_gear

histogram distr_region, bin(22) lw(medthick) ylab(0(1)5, labsize(large)) xlab(0(5)20, labsize(large)) barw(0.9) start(0) fcolor(gs8) lcolor(gs2) freq xti(No. of participants with proximity = 1 (region), size(vlarge)) yti(No. of sessions, size(vlarge))

sum distr_region, d
tab distr_region


* The models in Table A-6 are run for Figure 5 (see above)

***
* Table A-7:
use "creation_norms_data.dta", clear
egen affil2=group(affil)

* column (1)
vcemway probit coop ib2.affil2##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, cluster(session_period individual)

* column (2)
vcemway probit ee ib2.affil2##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, cluster(session_period individual)


***
* Table A-8
use "creation_norms_data.dta", clear

* column (1)
reghdfe coop c.affil##ib4.treatment c.period##ib4.treatment crewsize age age2 crewsize understand i.session_id, cluster(session_period individual) noabsorb

* column (2)
reghdfe coop affil_100gear_0orig##ib4.treatment affil_0gear_100orig##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, cluster(session_period individual) noabsorb

* column (3)
reghdfe coop affil_100gear_0orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (4)
reghdfe coop affil_0gear_100orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (5)
reghdfe coop c.affil_75gear_25orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (6)
reghdfe coop c.affil_25gear_75orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb



***
* Table A-9
use "creation_norms_data.dta", clear

* column (1)
reghdfe ee c.affil##ib4.treatment c.period##ib4.treatment crewsize age age2 crewsize understand i.session_id, cluster(session_period individual) noabsorb

* column (2)
reghdfe ee affil_100gear_0orig##ib4.treatment affil_0gear_100orig##ib4.treatment c.period##ib4.treatment crewsize age age2 understand i.session_id, cluster(session_period individual) noabsorb

* column (3)
reghdfe ee affil_100gear_0orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (4)
reghdfe ee affil_0gear_100orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (5)
reghdfe ee c.affil_75gear_25orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb

* column (6)
reghdfe ee c.affil_25gear_75orig##ib4.treatment c.period##ib4.treatment age age2 understand crewsize i.session_id, cluster(session_period individual) noabsorb


****************
*** end code ***
****************
